﻿using System;
using System.Net;
using System.Runtime.Serialization;

namespace SBPweb.PROvibe.Shared.Contracts.Content
{

    public struct ClientDescriptor// : IClientDescriptor
    {

        public static ClientDescriptor Unknown = new ClientDescriptor("0.0.0.0", string.Empty);
        public static ClientDescriptor Empty = default(ClientDescriptor);

        #region Private fields

        private string sessionId;
        private string clientIp;

        #endregion

        #region Constructor logic

        public ClientDescriptor(string clientIp, string sessionId)
        {
            this.sessionId = sessionId;
            this.clientIp = clientIp;
        }

        #endregion

        #region Property accessors

        public string SessionId
        {
            get
            {
                return this.sessionId;
            }
            set
            {
                this.sessionId = value;
            }
        }

        public string ClientIp
        {
            get
            {
                return this.clientIp;
            }
            set
            {
                this.clientIp = value;
            }
        }

        #endregion

        #region Methods

        public override string ToString()
        {
            return string.Format("[{0}]: {1}", ClientIp, SessionId);
        }

        #endregion

    }

}